<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
    <title>

    </title>
</head>

<body>

<div id="wrapper">
    <div class="gray-bg">
        <div class="row m-t-sm">
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-content">
                            <form method="get" data-ajax="${ctx}/admin/pe/packages/list" action="${ctx}/admin/pe/packages/${method}"  class="form-horizontal" id="user_form">
                                <div class="form-group">
                                    <div class="table-responsive">
                                        <table class="table table-striped table-bordered table-hover dataTables" id="item-table">
                                            <thead>
                                                <tr>
                                                    <th width="20%">服务项名称</th>
                                                    <th width="20">次数</th>
                                                    <th width="60">描述</th>
                                                </tr>
                                            </thead>
                                        </table>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<script src="${ctx}/static/inspinia/js/plugins/layer/layer.js"></script>
<script src="${ctx}/static/inspinia/js/jquery-2.1.1.js"></script>
<script>
    $(document).ready(function() {
        var SpckItemVo = JSON.parse('${data}');
        if (SpckItemVo.length > 0){
            for (i in SpckItemVo) {
                addItem(SpckItemVo[i].title ,SpckItemVo[i].residueDegree ,  SpckItemVo[i].memo);
            }
        }
    });


    function addItem(title,  residueDegree,memo ) {
        var model = $(
                "<tr>" +
                "<td>" + title + "</td>" +
                "<td>" + residueDegree + "</td>"+
                "<td>" + memo + "</td>"
        );
        model.append("</tr>");
        $("#item-table").append(model);
        return true;
    }




</script>
</body>
</html>
